#include <tsin/input/Input.hpp>

#include <tsin/input/InputEvent.hpp>

#include <tsin/util/Logger.hpp>
#include <tsin/util/EventMediator.hpp>

using namespace tsin;

Input::Input()
        : head(0), tail(0)
{
        eventBase = EventMediator::get()->requestEventRange(1);
}

void Input::triggerEvents()
{
        this->prepareEvent();
        while (this->pollEvent(event))
                emit(0);
}

void *Input::getEventInfo()
{
        return &event;
}
